Kanzi 3.9.10
kanzi::ToggleButton3D Class Reference

Use the Toggle Button 3D node to create a 3D UI control that the user can interact with through clicking, tapping, or pressing a keyboard key, and that has multiple toggle states. More...

#include <kanzi/ui/node/toggle_button3d.hpp>

Inheritance diagram for kanzi::ToggleButton3D:
[legend]

Public Types

using ConceptClass
 Button concept used to implement this class.
 
- Public Types inherited from kanzi::ButtonConceptImpl< Node3D, ToggleButton3D >
using ToggleButtonGroup
 

Static Public Member Functions

static ToggleButton3DSharedPtr create (Domain *domain, string_view name)
 Creates a toggle button node.
 
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
- Static Public Member Functions inherited from kanzi::ButtonConceptImpl< Node3D, ToggleButton3D >
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
- Static Public Member Functions inherited from kanzi::ClickConceptImpl< TBaseClass, TDerivedClass >
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
- Static Public Member Functions inherited from kanzi::ClickConcept
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 
- Static Public Member Functions inherited from kanzi::ButtonConcept
static PropertyTypeEditorInfoSharedPtr makeEditorInfo ()
 

Protected Member Functions

 ToggleButton3D (Domain *domain, string_view name)
 Constructor.
 
- Protected Member Functions inherited from kanzi::ButtonConceptImpl< Node3D, ToggleButton3D >
 ButtonConceptImpl (Domain *domain, string_view name)
 
void initialize ()
 
void onAttached () override
 
void onClick (ClickManipulator::ClickMessageArguments &)
 
void onClickBegin (ClickManipulator::ClickBeginMessageArguments &)
 
void onClickCancel (ClickManipulator::ClickCancelMessageArguments &)
 
void onClickEnter (ClickManipulator::ClickEnterMessageArguments &)
 
void onClickLeave (ClickManipulator::ClickLeaveMessageArguments &)
 
void onDetached () override
 
void onKeyCancel (KeyManipulator::KeyCanceledMessageArguments &arguments)
 
void onKeyDown (KeyManipulator::KeyPressedMessageArguments &arguments)
 
void onKeyUp (KeyManipulator::KeyReleasedMessageArguments &arguments)
 
void onLongPress (LongPressManipulator::LongPressMessageArguments &arguments)
 
void onNodePropertyChanged (AbstractPropertyType propertyType, PropertyNotificationReason reason) override
 
void repeatHandler ()
 
- Protected Member Functions inherited from kanzi::ClickConceptImpl< TBaseClass, TDerivedClass >
 ClickConceptImpl (Domain *domain, string_view name)
 Constructor.
 
void configureDoubleClick ()
 Configures a MultiClickManipulator for an ClickConcept-derived class based on the value of the DoubleClickEnabledProperty:
 
void onAttached () override
 Overrides TBaseClass::onAttached().
 
void onClicked (ClickManipulator::ClickMessageArguments &messageArguments)
 Handles click event.
 
void onDetached () override
 Overrides TBaseClass::onDetached().
 
void onMultiClicked (MultiClickManipulator::MultiClickMessageArguments &messageArguments)
 Handles multi-click event.
 
void onNodePropertyChanged (AbstractPropertyType propertyType, PropertyNotificationReason reason) override
 Overrides TBaseClass::onNodePropertyChanged().
 

Additional Inherited Members

- Public Member Functions inherited from kanzi::ButtonConceptImpl< Node3D, ToggleButton3D >
float getAutoClickInterval () const
 
optional< size_t > getEffectiveButtonGroupIndex () const
 Returns the index that Kanzi assigned to the Button when it was registered to a Toggle Button Group.
 
int getIndexInGroup () const
 Returns the value of IndexInGroupProperty.
 
float getLongPressInterval () const
 
unsigned int getToggleState () const
 Returns the value of ToggleStateProperty.
 
unsigned int getToggleStateCount () const
 Returns the value of ToggleStateCountProperty.
 
bool isCurrentlyRegistered () const
 Returns whether the Button is registered to a Toggle Button Group.
 
bool isPressed () const
 
bool isPressOnHover () const
 
void setAutoClickInterval (float value)
 
void setIndexInGroup (int value)
 Sets the value of IndexInGroupProperty.
 
void setLongPressInterval (float value)
 
void setPressed (bool value)
 
void setPressOnHover (bool value)
 
void setToggleState (unsigned int state)
 Sets the value of ToggleStateProperty.
 
void setToggleStateCount (unsigned int value)
 Sets the value of ToggleStateCountProperty.
 
void toggle ()
 Toggles the button.
 
- Public Member Functions inherited from kanzi::ClickConceptImpl< TBaseClass, TDerivedClass >
bool isDoubleClickEnabled () const
 Gets the value of DoubleClickEnabledProperty.
 
void setDoubleClickEnabled (bool value)
 Sets the value of DoubleClickEnabledProperty.
 
- Static Public Attributes inherited from kanzi::ClickConcept
static PropertyType< boolDoubleClickEnabledProperty
 Enables the double-click gesture for a node.
 
- Static Public Attributes inherited from kanzi::ButtonConcept
static PropertyType< boolIsPressedProperty
 Indicates whether the button is in the down state.
 
static PropertyType< floatLongPressIntervalProperty
 Sets the amount of time in milliseconds that the user must hold the button pressed down for Kanzi to recognize it as a long-press gesture.
 
static PropertyType< boolPressOnHoverProperty
 Indicates whether hovering the pointer over the button sets the button in the down state.
 
static PropertyType< floatAutoClickIntervalProperty
 Sets the time in milliseconds after which a button that the user keeps pressed down sends the ButtonConcept::ClickedMessage.
 
static PropertyType< intToggleStateProperty
 Sets the toggle state of a Button.
 
static PropertyType< intToggleStateCountProperty
 Sets the number of toggle states of a Button.
 
static PropertyType< intIndexInGroupProperty
 Sets the predefined index of a Button in the Toggle Button Group to which that Button is registered.
 
static MessageType< ClickedMessageArgumentsClickedMessage
 
static MessageType< PressedMessageArgumentsPressedMessage
 
static MessageType< CanceledMessageArgumentsCanceledMessage
 
static MessageType< PointerEnteredMessageArgumentsPointerEnteredMessage
 
static MessageType< PointerLeftMessageArgumentsPointerLeftMessage
 
static MessageType< LongPressMessageArgumentsLongPressMessage
 
static MessageType< ToggledOnMessageArgumentsToggledOnMessage
 
static MessageType< ToggledOffMessageArgumentsToggledOffMessage
 
static MessageType< ToggleStateChangedMessageArgumentsToggleStateChangedMessage
 
- Static Protected Member Functions inherited from kanzi::ButtonConcept
static Vector2 measure2D (Node2D *button, Vector2 availableSize)
 Measure function for a Node2D button.
 
- Protected Attributes inherited from kanzi::ClickConcept
ClickManipulatorSharedPtr m_clickManipulator
 The ClickManipulator.
 
MultiClickManipulatorSharedPtr m_multiClickManipulator
 Multi-Click manipulator.
 

Detailed Description

Use the Toggle Button 3D node to create a 3D UI control that the user can interact with through clicking, tapping, or pressing a keyboard key, and that has multiple toggle states.

Member Typedef Documentation

◆ ConceptClass

Button concept used to implement this class.

Constructor & Destructor Documentation

◆ ToggleButton3D()

kanzi::ToggleButton3D::ToggleButton3D ( Domain * domain,
string_view name )
explicitprotected

Constructor.

Parameters
domainThe UI domain the new node belongs to.
nameThe name of the node.

Member Function Documentation

◆ create()

static ToggleButton3DSharedPtr kanzi::ToggleButton3D::create ( Domain * domain,
string_view name )
static

Creates a toggle button node.

Parameters
domainThe UI domain to which the new node belongs.
nameThe name of the node.
Returns
The created node.

◆ makeEditorInfo()

static PropertyTypeEditorInfoSharedPtr kanzi::ToggleButton3D::makeEditorInfo ( )
static

The documentation for this class was generated from the following file: